Skalpel: A constraint-based type error slicer for Standard ML

نویسندگان

  • Vincent Rahli
  • Joe B. Wells
  • John Pirie
  • Fairouz Kamareddine
چکیده

Compilers for languages with type inference algorithms often produce confusing type error messages and give a single error location which is sometimes far away from the real location of the error. Attempts at solving this problem often (1) fail to include the multiple program points which make up the type error; (2) report tree fragments which do not correspond to any place in the user program; and (3) give incorrect type information/diagnosis which can be highly confusing. We present Skalpel, a type error slicing tool which solves these problems by giving the programmer all and only the information involved with a type error to significantly aid in diagnosis and repair of type errors. Skalpel relies on a simple and general constraint system, a sophisticated constraint generator which is linear in program size, and a constraint solver which is terminating. Skalpel’s constraint system can elegantly and efficiently handle intricate features such as SML’s open. We also show that the Skalpel tool is general enough to deal not only with one source code file and one single error, but highlights all and only the possible locations of the error(s) in all affected files and produces all the culprit multiple program slices.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Skalpel: A Type Error Slicer for Standard ML

Compilers for languages with type inference algorithms produce confusing type error messages and give a single error location which is often far away from the real location of the type error. Attempts at solving this problem 1) fail to include the multiple program points which make up the type error, 2) often report tree fragments which do not correspond to any place in the user program, and 3)...

متن کامل

A constraint system for a SML type error slicer

Existing compilers for many languages have confusing type error messages. Type error slicing (TES) helps the programmer by isolating the part of a program contributing to a type error, but unfortunately TES was initially done for a tiny toy language. Extending TES to a full programming language is extremely challenging, and for SML we needed a number of innovations and generalisations. Some iss...

متن کامل

Mitigating Error Propagation of Décision Feedback Equalization in Broadband Communications

Inter-symbol interférence is the main obstacle in reliable digital communications. Except for the spécial partial response signaling system, ISI must be suppressed as much as possible in order to obtain reliable digital communications. In wideband digital com­ munication, equalization is one of the main techniques to reverse ISI channel. Décision feedback equalizer is a popular structure becaus...

متن کامل

Challenges of a type error slicer for the SML language

SML (a higher-order function-oriented imperative programming language) depends on automated inference of sophisticated type information. Existing implementations have confusing type error messages. Type error slicing gives the programmer more helpful type error information: (1) It identifies all program points that contribute to a type error rather than blaming just one point. (2) It exhibits a...

متن کامل

Constraint-Based Typing for ML via Semiunification

We characterize ML type inference as a constraint satisfaction based on a new generalization of the semiunification problem, based on a new class of constraint variables that we call unknowns (we call the semiunification problem with unknowns USUP). Unlike previous characterizations based on ordinary semiunification, ours maintains a one-to-one correspondence between terms in the source languag...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • J. Symb. Comput.

دوره 80  شماره 

صفحات  -

تاریخ انتشار 2017